<template>
  <div>
    <!-- 头部区域 -->
    <div class="title">
      <img src="../MyInfo/bg.png" alt="" />
      <div class="user_card">
        <div class="user_icon">
          <img src="./avatar.png" alt="" />
        </div>
        <div class="user_text">
          <p>游客</p>
          <!-- <button class="login_btn">去登陆</button> -->
          <button class="login_btn" @click="loginFn">去登陆</button>
        </div>
      </div>
    </div>
    <div class="content">
      <van-grid :column-num="3">
        <van-grid-item icon="star-o" text="我的收藏" />
        <van-grid-item icon="wap-home-o" text="我的出租" />
        <van-grid-item icon="underway-o" text="看房记录" />
        <van-grid-item icon="label-o" text="成为房主" />
        <van-grid-item icon="user-o" text="个人资料" />
        <van-grid-item icon="phone-o" text="联系我们" />
      </van-grid>
    </div>
    <div class="my_ad">
      <img src="./join.png" alt="" style="width: 92%" />
    </div>
  </div>
</template>

<script>
export default {
  methods: {
    loginFn() {
      this.$router.push({
        path: "/login",
      });
    },
  },
};
</script>

<style>
* {
  box-sizing: border-box;
}
.title {
  min-height: 300px;
  position: relative;
}
.title img {
  width: 100%;
}
.title .user_card {
  position: absolute;
  background: #fff;
  width: 85%;
  height: 55%;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 10px 3px #ddd;
  margin: 50px auto 0;
  padding: 0 20px;
  text-align: center;
  font-size: 13px;
}
.title .user_card .user_icon {
  position: relative;
  transform: translateY(-50%);
  border-radius: 50%;
  width: 70px;
  height: 70px;
  border: 5px solid #f5f5f5;
  display: inline-block;
  box-shadow: 0 2px 2px #bdbdbd;
}

.login_btn {
  margin-top: 10px;
  background-color: #21b97a;
  color: #fff;
  border: #21b97a;
  border-radius: 5px;
  width: 60px;
  height: 30px;
}
.content {
  margin-top: 10px;
}
.my_ad {
  margin-top: 20px;
  text-align: center;
}
</style>
